Command Line Parameters

Return to Introduction  Previous page  Next page

 

Command Line

 

A Definition of the Command Line

 

A Command Line is a space provided directly on the screen where users type specific commands. A CLI (command line interface) is a user interface to a computer's operating system or an application in which the user responds to a visual prompt by typing in a command on a specified line, receives a response back from the system, and then enters another command. The MS-DOS Prompt application in the Windows operating system is an example of the provision of a command line interface. Today, most users prefer the graphical user interface (GUI) offered by Windows or Macs.

 

SyncBackSE Command Line Parameters

 

SyncBackSE accepts a number of command line parameters. Some of these are used when SyncBackSE is called from the Windows Task Scheduler. Note that when SyncBackSE is run with command line parameters, by default it will run in 'Unattended' mode and be minimized, which means that it will not prompt the user and will not be visible on screen.

 

·r: The profiles following this parameter are run in restore mode. By default profiles are run as backups/Synchronizations.

 

·i: The profiles following this parameter are run in interactive mode. By default profiles run from the command line are run unattended, i.e. no prompts are displayed.

 

·m: The profiles following this parameter are run in minimized mode, i.e. nothing is displayed on the screen. This is the default.

 

·n: The profiles following this parameter are run in normal mode, i.e. dialogs and windows are displayed on the screen. By default profiles run from the command line are run in minimized mode.

 

·p: The profiles following this parameter are run in parallel, i.e. they are all run at the same time. Normally the profiles are run in serial (one after the other).

 

·s: The profiles following this parameter are run in simulated mode, i.e. no files are actually copied or deleted.

 

·hibernate: Place the computer into hibernate mode (if the computer supports it).

 

·standby: Place the computer into standby mode (if the computer supports it).

 

·shutdown: Logoff, shutdown, and switch off the computer (if the computer supports it) (not supported on Windows 95/98/98SE)

 

·reboot: Reboot the computer (if the computer supports it).

 

·rebootifreq: Reboot the computer (if the computer supports it) if a profile was run that required a reboot for a file to be replaced/deleted.

 

·full: Perform a full backup, i.e. rescan the destination for changes. This is only for profiles using the "Fast Backup" setting.

 

·countdown [seconds]: When used this parameter will cause a small window appear with a countdown timer in it. For example, if you passed -countdown 10 then a window will appear counting down from 10 seconds. Once it reaches zero then the profiles following it in the command line will be run. You can abort the countdown (and exit the program) and so abort running of the profiles.

 

·Export [profile name] [filename]: This parameter is used to export a profile, or export all profiles. For example: -export "My Profile" "C:\Profiles\My Profile.sps" will export the profile called My Profile to the file C:\Profiles\My Profile.sps. To export all profiles you must use an asterisk for the profile name and supply a directory instead of a filename, e.g. export * "C:\My Profiles" will export all profiles to the directory C:\My Profiles. The filenames will be the same as the profile names (with the .SPS filename extension).

 

·source: Set the source folder for all the following profiles to use. Variables can be used, but please see the important information at the end of the Variables section on how Windows expands environment variables.

 

·dest: Set the destination folder for all the following profiles to use. Variables can be used, but please see the important information at the end of the Variables section on how Windows expands environment variables.

 

·nosplash: The splash screen will not be displayed.

 

·delete [profile name]: The named profile is deleted.

 

·donotexit: By default SyncBackSE will automatically exit after performing the tasks given on the command line (that is unless the user interface is used while performing those tasks). To stop it exiting use this parameter.

 

·password [password]: When deleting or importing profiles, an existing profile may exist with that name and be password protected. Use this parameter to provide the password. The password parameter must come before the import filename or ûdelete parameter, e.g. ûpassword ôthe passwordö ûdelete ôprofile nameö

 

·priority [priority]: The profiles following this on the command line will be run at this priority. 1 (Idle) is the lowest priority, and 7 (Time Critical) is the highest. The default is 4 (Normal).

 

All other parameters are assumed to be profile names. If a profile name has a space in it use double quotes around the profiles name, e.g. "All Profiles". The profile names are not case sensitive. So for example:

 

SyncBackSE profile1 -i profile2 profile3 -n -r "profile 4" -hibernate

 

This command will run profile1 as a backup/sync in unattended and minimized modes, profile2 and profile3 as a backup/sync in interactive and minimized modes, profile 4 as a restore in interactive and normal mode, and once all the profiles have finished the computer will hibernate.

 

If SyncBackSE is run with no command line parameters then it will first check to see if any other instances of SyncBackSE are running which also started with no command line parameters. If so, it will not start. This helps ensure only one instance of SyncBackSE is running.

 

However, whenever SyncBackSE is run with command line parameters, it will run regardless of whether any other instances of SyncBackSE are running or not. Also, if run with command line parameters, SyncBackSE will exit once it has finished its tasks, but if you use any part of its user interface while it is running then it will not exit.

 

Importing Profiles

 

You can automatically import profiles by passing the filename of the exported profile on the command line. For example, if you exported a profile and saved it as 'MyProfile. SPS' then if you pass this on the command line to SyncBackSE it will automatically import the profile. The filename extension must be .SPS otherwise it is assumed to be the name of a profile to run.

 

Exit Codes

 

When running SyncBackSE from the command line, a batch file, etc. then it will return an exit code that gives an indication of whether the task was completed successfully or not. As a number of tasks can be done via the command line at the same time, e.g. import a profile, run it, then delete it, the exit code relates to the last task done on the command line. Also note that if a group profile is run then the exit code is undefined.

 

0 û Success.

 

100 û SyncBackSE did not close because of user interaction or the donotexit parameter was used.

 

-100 û The countdown parameter was used and the user aborted it.

 

-101 û An attempt was made to import a profile from the command line and it failed.

 

-102 û The export parameter was used and a profile export failed.

 

-103 û The delete parameter was used and the profile failed to be deleted.

 

-104 û The user aborted the profile run.

 

-105 û The profile name given does not exist.

 

-106 û The profile was not run because it is disabled.

 

-107 û The profile run failed (not that the result of a group profile run is unknown).

 

 

 

All Content: 2BrightSparks Pte Ltd ⌐ 2003-2006